import { defineStore } from 'pinia';

const useCounter = defineStore('user', {
    state: () => ({
        username: '',

        id: '',
        uuid: ''
    }),
    getters: {
        isLogin: (state) => !state.username,
    },
    actions: {
        setCredentiala(username, id, uuid) {
            this.username = username;
            // this.password = password;
            this.id = id;
            this.uuid = uuid;
        },
        clearLogout() {
            this.username = '';
            // this.password = '';
            this.id = '';
            this.uuid = '';
        }
    }
})

export default useCounter;